home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************/
- /* */
- /* BGBBS.REXX - Oh well Xenolink is in need of a new BBS lister so here */
- /* V0.6 it is. As XBBSLister hasn't been updated in yonks I */
- /* 21st July 98 thought I'd knock a new BBS lister up, hope you like it. */
- /* */
- /* (C)1998 Ben Gaunt Sysop: Channel X BBS +44 (0)181 943 5187 */
- /* (AKA: BenG OR Madness on IRC) */
- /* Fido: 2:254/260.12 */
- /* e-mail: ben.gaunt@pickled.demon.co.uk */
- /* */
- /* NEEDS: T: to be assigned (assign T: RAM:T) its in most start ups ;) */
- /* */
- /****************************************************************************/
-
- /* Arguments: BGBBS.REXX [NODE_NUMBER] */
-
- /*************************************************************************/
- /* I BEN GAUNT THE PROGRAMER OF THIS BBS LISTER REQUESTS THAT YOU DO NOT */
- /* ALTER THE LINE DISPLAYING MY BBS NUMBER. AFTER ALL THIS DOOR IS */
- /* FREEWARE AND IT WOULD BE NICE FOR ME TO GET A REWARD OF A FEW NEW */
- /* USERS FOR MY TROUBLES. BUT IF YOU REALY DONT WANT TO HAVE MY NUMBER */
- /* THERE FEEL FREE TO REMOVE IT, IT WOULD BE NICE IF YOU WOULD KEEP IT */
- /* THERE THOUGH ;) */
- /*************************************************************************/
-
- OPTIONS RESULTS
- arg Node_Number
- Signal on error
- signal on syntax
- signal on IOERR
- PortName = 'XenolinkRexxPort'Node_Number
- GetUserVar Name
- nicename result
- uname$ = result
- GetUserVar Privilege
- alevel = result
-
- GetUserVar PageLength
- plength = result
- dplength = plength - 8
-
- GetUserVar MenuSet
- menuset=result
-
- /* ======================================================================== */
- /* <<< CONFIGURATION >>> <<< CONFIGURATION >>> <<< CONFIGURATION >>> */
- /* ======================================================================== */
-
- /* THE VALUE [0] BELOW SHOULD BE = TO FIRST MENUSET TO USE ANSI COLOUR */
- /* 1 = USE ANSI + COLOUR, 0 = USE ASCII TEXT */
-
- if menuset > 0 then do
- _ANSI = 1
- end
- else do
- _ANSI = 0
- end
-
-
- /* IF YOU WANT BGBBS IN A DIFFERENT LOCATION CHANGE THE PATH$ TO POINT TO */
- /* THE NEW PATH. <<< IMPORTANT >>> THE PATH$ MUST END IN A : OR / */
-
- PATH$="REXX:BGBBS/"
-
- /* ======================================================================== */
- /* <<< END CONFIGURATION >>> <<< END CONFIGURATION >>> */
- /* ======================================================================== */
-
- /* SET UP EASY COLOURS ;) */
- RED=''
- GRE=''
- YEL=''
- BLU=''
- PUR=''
- CYA=''
- OFF=''
-
- /* ======================================================================== */
-
- CLS
- message 'Loading BBS data, please wait a moment....'
-
- call DATLOAD
-
- /* ======================================================================== */
-
- MAINMENU:
-
- do forever
-
- call BANNER
-
- if _ANSI = 1 then do
- newline
- message RED' ['OFF'1'RED']'OFF' View the BBS list'
- message RED' ['OFF'2'RED']'OFF' Search BBS list'
- message RED' ['OFF'3'RED']'OFF' Download BBS list (ASCII TEXT)'
- message RED' ['OFF'4'RED']'OFF' Add a BBS to the list'
- message RED' ['OFF'5'RED']'OFF' Edit a BBS on the list'
- message RED' ['OFF'6'RED']'OFF' Delete a BBS from the list'
- message RED' ['OFF'7'RED']'OFF' Help'
- newline
- message RED' ['OFF'8'RED']'OFF' Exit'
- newline
- end
- else do
- newline
- message ' [1] View the BBS list'
- message ' [2] Search BBS list'
- message ' [3] Download BBS list (ASCII TEXT)'
- message ' [4] Add a BBS to the list'
- message ' [5] Edit a BBS on the list'
- message ' [6] Delete a BBS from the list'
- message ' [7] Help'
- newline
- message ' [8] Exit'
- newline
- end
-
- msg ' The choice is yours> '
-
- do until choice >0 & choice <9
- getchar
- choice=result
- end
-
- if choice = 1 then do
- call VIEWLIST
- end
-
- if choice = 2 then do
- call SEARCH
- end
-
- if choice = 3 then do
- call DOWN
- end
-
- if choice = 4 then do
- call NEWBBS
- end
-
- if choice = 5 then do
- call EDIT
- end
-
- if choice = 6 then do
- call KILL
- end
-
- if choice = 7 then do
- call HELP
- end
-
- if choice = 8 then do
- CLS
- exitscript
- end
-
- end
-
- /* ======================================================================== */
-
- NEWBBS:
-
- call BANNER
- newline
- /* GET BBS DETAILS */
- n=totalBBS+1
- if _ANSI = 1 then do
- msg GRE' BBS name:'OFF
- getline 58 normal ' '
- BBS$.n.1 = result
-
- msg GRE' Telephone number:'OFF
- getline 58 normal ' '
- BBS$.n.2 = result
-
- msg GRE' Open hours:'OFF
- getline 58 normal ' '
- BBS$.n.3 = result
-
- msg GRE' Max baud rate:'OFF
- getline 58 normal ' '
- BBS$.n.4 = result
-
- msg GRE' Location:'OFF
- getline 58 normal ' '
- BBS$.n.5 = result
-
- msg GRE' BBS Software:'OFF
- getline 58 normal ' '
- BBS$.n.6 = result
-
- msg GRE' Sysop''s name:'OFF
- getline 58 normal ' '
- BBS$.n.7 = result
-
- msg GRE' Mail Networks:'OFF
- getline 58 normal ' '
- BBS$.n.8 = result
-
- msg GRE' Net address:'OFF
- getline 58 normal ' '
- BBS$.n.9 = result
-
- msg GRE' Email address:'OFF
- getline 58 normal ' '
- BBS$.n.10 = result
-
- msg GRE'Computers supported:'OFF
- getline 58 normal ' '
- BBS$.n.11 = result
-
- msg GRE' Comment (1/3):'OFF
- getline 58 normal ' '
- BBS$.n.12 = result
-
- msg GRE' Comment (2/3):'OFF
- getline 58 normal ' '
- BBS$.n.13 = result
-
- msg GRE' Comment (3/3):'OFF
- getline 58 normal ' '
- BBS$.n.14 = result
-
- message GRE' Date: 'RED||date()||OFF
- BBS$.n.15 = date()
- end
- else do
- msg ' BBS name:'
- getline 58 normal ' '
- BBS$.n.1 = result
-
- msg ' Telephone number:'
- getline 58 normal ' '
- BBS$.n.2 = result
-
- msg ' Open hours:'
- getline 58 normal ' '
- BBS$.n.3 = result
-
- msg ' Max baud rate:'
- getline 58 normal ' '
- BBS$.n.4 = result
-
- msg ' Location:'
- getline 58 normal ' '
- BBS$.n.5 = result
-
- msg ' BBS Software:'
- getline 58 normal ' '
- BBS$.n.6 = result
-
- msg ' Sysop''s name:'
- getline 58 normal ' '
- BBS$.n.7 = result
-
- msg ' Mail Networks:'
- getline 58 normal ' '
- BBS$.n.8 = result
-
- msg ' Net address:'
- getline 58 normal ' '
- BBS$.n.9 = result
-
- msg ' Email address:'
- getline 58 normal ' '
- BBS$.n.10 = result
-
- msg 'Computers supported:'
- getline 58 normal ' '
- BBS$.n.11 = result
-
- msg ' Comment (1/3):'
- getline 58 normal ' '
- BBS$.n.12 = result
-
- msg ' Comment (2/3):'
- getline 58 normal ' '
- BBS$.n.13 = result
-
- msg ' Comment (3/3):'
- getline 58 normal ' '
- BBS$.n.14 = result
-
- message ' Date: 'date()
- BBS$.n.15 = date()
- end
-
- QUERYN 'Is all the above correct?'
- yn$ = result
-
- /* IF DATA IS CORRECT ADD IT TO THE BBS LIST DAT FILE */
- if yn$ = 'Y' then do
-
- BBS$.n.16 = uname$
- totalBBS=totalBBS+1
-
- newline
- msg 'Adding BBS details to the BBS list......'
- call open(datafile, PATH$||'BGBBS.DAT', 'a')
- call writeln(datafile, BBS$.n.1)
- call writeln(datafile, BBS$.n.2)
- call writeln(datafile, BBS$.n.3)
- call writeln(datafile, BBS$.n.4)
- call writeln(datafile, BBS$.n.5)
- call writeln(datafile, BBS$.n.6)
- call writeln(datafile, BBS$.n.7)
- call writeln(datafile, BBS$.n.8)
- call writeln(datafile, BBS$.n.9)
- call writeln(datafile, BBS$.n.10)
- call writeln(datafile, BBS$.n.11)
- call writeln(datafile, BBS$.n.12)
- call writeln(datafile, BBS$.n.13)
- call writeln(datafile, BBS$.n.14)
- call writeln(datafile, BBS$.n.15)
- call writeln(datafile, BBS$.n.16)
- call close(datafile)
- msg 'done.'
- end
- /* IF DATA ISNT CORRECT INFORM USER DATA HASNT BEEN ADDED TO THE LIST */
- else do
- newline
- message 'Entry aborted BBS details have NOT been added to the list.'
- newline
- msg 'Press any key to continue.'
- getchar
- end
-
- return
-
- /* ======================================================================== */
-
- VIEWLIST:
-
- call BANNER
-
- if _ANSI = 1 then do
- newline
- message GRE'Would you like to see a 'RED'['OFF'S'RED']'GRE'hort quick list or a 'RED'['OFF'F'RED']'GRE'ull detailed list?'OFF
- newline
- msg RED'['OFF's'RED']'GRE'hort/'RED'['OFF'F'RED']'GRE'ull > 'OFF
- end
- else do
- newline
- message 'Would you like to see a [S]hort quick list or a [F]ull detailed list?'
- newline
- msg '[s]hort/[F]ull > '
- end
-
- getchar
- lview$=result
- lview$=upper(lview$)
-
- if lview$ = 'S' then do
- /* SHORT LISTER */
-
- pause = (plength-8)/5
-
- /* do n=1 to totalBBS */
- n=0
- do until n >= totalBBS
- call banner
- counter = 0
-
- /* KEEP PRINTING THE BBS DATA UNTIL SCREEN IS FULL OR END OF FILE */
- /* HAS BEEN REACHED */
- /* THIS IS VERY VERY VERY MESSY :-/ */
- do until counter >= pause-1 | n = totalBBS
-
- newline
- counter = counter +1
- n=n+1
-
- if _ANSI = 1 then do
- message GRE' BBS name: 'YEL||BBS$.n.1
- message GRE' Telephone number: 'OFF||BBS$.n.2
- message GRE' Open hours: 'OFF||BBS$.n.3
- message GRE'Computers supported: 'OFF||BBS$.n.11
- end
- else do
- message ' BBS name: '||BBS$.n.1
- message ' Telephone number: '||BBS$.n.2
- message ' Open hours: '||BBS$.n.3
- message 'Computers supported: '||BBS$.n.11
- end
- end
-
- newline
- msg ' Press any key to continue or press Q to quit'
- getchar
- choice$=result
- upper choice$
- if choice$ = 'Q' then do
- n=totalBBS
- end
-
- end
-
- end
- else do
- /* FULL LISTER */
- do n=1 to totalBBS
- /* DISPLAY THE RECENTLY READ IN DATA */
-
- call banner
-
- /* DISPLAY THE BBS DETAILS */
- call DISPLAYBBS(n)
-
- /* LINE 16 ISNT SHOWN USED IN DEL OPTION */
-
- newline
- msg ' Press any key to continue or press Q to quit'
- getchar
- choice$=result
- upper choice$
- if choice$ = 'Q' then do
- n=totalBBS
- end
-
- end
-
- end
-
- return
-
- /* ======================================================================== */
-
- DOWN:
-
- call BANNER
- newline
- message 'Generating ASCII text file from the BBS lister data, please wait...'
- newline
-
- call open(introdata, PATH$||'INTRO.TXT', 'R')
- call open(enddata, PATH$||'END.TXT', 'R')
-
- call open(ASCII, 'T:BBS_LIST.TXT', 'W')
-
- /* COPY INTRO TEXT TO ASCII FILE */
- do until eof(introdata)
- aline$ = readln(introdata)
- call writeln(ASCII, aline$)
- end
-
- /* WRITE BBS LIST TO ASCII FILE */
- do n=1 to totalBBS
- call writeln(ASCII, ' BBS name: '||BBS$.n.1)
- call writeln(ASCII, ' Telephone number: '||BBS$.n.2)
- call writeln(ASCII, ' Open hours: '||BBS$.n.3)
- call writeln(ASCII, ' Max baud rate: '||BBS$.n.4)
- call writeln(ASCII, ' Location: '||BBS$.n.5)
- call writeln(ASCII, ' BBS Software: '||BBS$.n.6)
- call writeln(ASCII, ' Sysop''s name: '||BBS$.n.7)
- call writeln(ASCII, ' Mail Networks: '||BBS$.n.8)
- call writeln(ASCII, ' Net address: '||BBS$.n.9)
- call writeln(ASCII, ' Email address: '||BBS$.n.10)
- call writeln(ASCII, 'Computers supported: '||BBS$.n.11)
- call writeln(ASCII, ' Comment: '||BBS$.n.12)
- call writeln(ASCII, ' '||BBS$.n.13)
- call writeln(ASCII, ' '||BBS$.n.14)
- call writeln(ASCII, 'Date placed on list: '||BBS$.n.15)
- call writeln(ASCII, '')
- call writeln(ASCII, '----------------------------------------------------------------------------')
- call writeln(ASCII, '')
- end
-
- /* COPY END TEXT TO ASCII FILE */
- do until eof(enddata)
- aline$ = readln(enddata)
- call writeln(ASCII, aline$)
- end
-
- /* TAG IT ;) */
- call writeln(ASCII, ' .----------------------------------------------------------.')
- call writeln(ASCII, ' | This file was created with BG-BBS LISTER ©1998 Ben Gaunt |')
- call writeln(ASCII, ' | Another Pickled Fish Software Production! |')
- call writeln(ASCII, ' `----------------------------------------------------------''')
-
- call close (ASCII)
- call close (introdata)
- call close (enddata)
-
- DOWNLOADFILE 'T:BBS_LIST.TXT'
- dl = result
-
- if dl = 1 then do
- message 'Download failed, local download not allowed!'
- end
-
- if dl = 2 then do
- message 'Download failed, file does not exist?'
- end
-
- if dl = 3 then do
- message 'File already marked for downloading!'
- startdownload 1
- end
-
- newline
- msg 'Press any key to continue'
- getchar
-
- return
-
- /* ======================================================================== */
-
- SEARCH:
-
- call banner
-
- newline
- if _ANSI=1 then do
- Message RED'Warning if there are a lot of records this may take some time!'
- newline
- Msg GRE'Search for? > '
- end
- else do
- Message 'Warning if there are a lot of records this may take some time!'
- newline
- newline
- Msg 'Search for? > '
- end
-
- getline 58 normal
- findme$ = result
- upper findme$
-
- if length(findme$) > 0 then do
-
- /* TOTAL BBS SEARCH */
- do n = 1 to totalBBS
-
- /* RESET THE FOUND FLAG */
- found = 0
-
- newline
- msg 'Searching '||BBS$.n.1' details'
-
- /* FIELDS OF BBS SEARCH */
- do f =1 to 16
-
-
- /* CHECK FOR MATCH */
- foundit$ = upper(BBS$.n.f)
- z=length(foundit$)
- x=length(findme$)
-
- do i = 1 to z
- itsme$ = substr(foundit$,i,x)
-
- if itsme$ = findme$ then do
- found=1
- end
-
- end
-
-
- /* DISPLAY BBS DETAILS IF A MATCH IS FOUND */
- if found = 1 then do
-
- /* END THE FIELD SEARCH */
- f=16
-
- call banner
- newline
- call DISPLAYBBS(n)
- newline
-
- msg ' Press any key to continue or press Q to quit'
- getchar
- quiter$=result
- upper quiter$
- if quiter$ = 'Q' then do
- n = totalBBS
- end
- else do
- CLS
- call BANNER
- end
- end
-
- end
-
- end
-
- end
-
- Newline
- Newline
- if _ANSI=1 then do
- Msg GRE'Search finished - press any key'
- end
- else do
- Msg 'Search finished - press any key'
- end
- getchar
-
- return
-
- /* ======================================================================== */
-
- KILL:
-
- call banner
- newline
-
- do n=1 to totalBBS
-
- /* SEE IF USER WISHING TO DELETE HAS ENTERD ANYTHING */
- if BBS$.n.16 = uname$ | alevel = 255 then do
-
- call displaybbs(n)
- newline
- QUERYN 'Delete this BBS record? '
- killme = upper(result)
-
- if killme = 'Y' then do
-
- newline
- msg 'Removing BBS details from list pleas wait...'
-
- call open(datafile, PATH$||'BGBBS.DAT', 'W')
- do a=1 to totalBBS
-
- if a ~= n then do
- call writeln(datafile, BBS$.a.1)
- call writeln(datafile, BBS$.a.2)
- call writeln(datafile, BBS$.a.3)
- call writeln(datafile, BBS$.a.4)
- call writeln(datafile, BBS$.a.5)
- call writeln(datafile, BBS$.a.6)
- call writeln(datafile, BBS$.a.7)
- call writeln(datafile, BBS$.a.8)
- call writeln(datafile, BBS$.a.9)
- call writeln(datafile, BBS$.a.10)
- call writeln(datafile, BBS$.a.11)
- call writeln(datafile, BBS$.a.12)
- call writeln(datafile, BBS$.a.13)
- call writeln(datafile, BBS$.a.14)
- call writeln(datafile, BBS$.a.15)
- call writeln(datafile, BBS$.a.16)
- end
-
- end
-
- call close(datafile)
- call DATLOAD
- /* RESET FOR DO POINTER */
- n=n-1
-
- end
-
- call banner
- newline
-
- end
-
- end
-
- message 'There are no more BBS records that can be deleted by you.'
- newline
- message 'If there is a BBS record on here you wish removed please leave a message'
- message 'to the Sysop he/she can remove it for you.'
- newline
- msg 'Press any key to continue'
- getchar
-
- return
-
- /* ======================================================================== */
-
- EDIT:
-
- do n=1 to totalBBS
-
- call BANNER
- newline
-
- /* SEE IF USER WISHING TO EDIT HAS ENTERD ANYTHING */
- if BBS$.n.16 = uname$ | alevel = 255 then do
- abort='N'
- call displaybbs(n)
- newline
- QUERYN 'Edit this BBS record? '
- edme = upper(result)
-
- if edme = 'Y' then do
-
- do until abort='Y'
- call banner
- newline
- newline
-
- if _ANSI = 1 then do
- message YEL'1'GRE' BBS name: 'YEL||BBS$.n.1
- message YEL'2'GRE' Telephone number: 'OFF||BBS$.n.2
- message YEL'3'GRE' Open hours: 'OFF||BBS$.n.3
- message YEL'4'GRE' Max baud rate: 'OFF||BBS$.n.4
- message YEL'5'GRE' Location: 'OFF||BBS$.n.5
- message YEL'6'GRE' BBS Software: 'OFF||BBS$.n.6
- message YEL'7'GRE' Sysop''s name: 'OFF||BBS$.n.7
- message YEL'8'GRE' Mail Networks: 'OFF||BBS$.n.8
- message YEL'9'GRE' Net address: 'OFF||BBS$.n.9
- message YEL'10'GRE' Email address: 'OFF||BBS$.n.10
- message YEL'11'GRE'Compu''s supported: 'OFF||BBS$.n.11
- message YEL'12'GRE' Comment: 'CYA||BBS$.n.12
- message YEL'13'GRE' 'CYA||BBS$.n.13
- message YEL'14'GRE' 'CYA||BBS$.n.14
- message GRE'Date placed on list: 'RED||BBS$.n.15||OFF
- end
- else do
- message '1 BBS name: '||BBS$.n.1
- message '2 Telephone number: '||BBS$.n.2
- message '3 Open hours: '||BBS$.n.3
- message '4 Max baud rate: '||BBS$.n.4
- message '5 Location: '||BBS$.n.5
- message '6 BBS Software: '||BBS$.n.6
- message '7 Sysop''s name: '||BBS$.n.7
- message '8 Mail Networks: '||BBS$.n.8
- message '9 Net address: '||BBS$.n.9
- message '10 Email address: '||BBS$.n.10
- message '11 Comp''s supported: '||BBS$.n.11
- message '12 Comment: '||BBS$.n.12
- message '13 '||BBS$.n.13
- message '14 '||BBS$.n.14
- message 'Date placed on list: '||BBS$.n.15
- end
-
- newline
- msg 'Enter number of line to Edit, [S]ave & exit, [A]bort> '
- getline 3 normal ''
- ln=upper(result)
-
- /* SAVE UPDATED DATA */
- if ln='S' then do
-
- call open(datafile, PATH$||'BGBBS.DAT', 'W')
-
- do a=1 to totalBBS
- call writeln(datafile, BBS$.a.1)
- call writeln(datafile, BBS$.a.2)
- call writeln(datafile, BBS$.a.3)
- call writeln(datafile, BBS$.a.4)
- call writeln(datafile, BBS$.a.5)
- call writeln(datafile, BBS$.a.6)
- call writeln(datafile, BBS$.a.7)
- call writeln(datafile, BBS$.a.8)
- call writeln(datafile, BBS$.a.9)
- call writeln(datafile, BBS$.a.10)
- call writeln(datafile, BBS$.a.11)
- call writeln(datafile, BBS$.a.12)
- call writeln(datafile, BBS$.a.13)
- call writeln(datafile, BBS$.a.14)
- call writeln(datafile, BBS$.a.15)
- call writeln(datafile, BBS$.a.16)
- end
-
- call close(datafile)
-
- abort='Y'
- end
-
-
-
- /* EDIT BBS DETAILS */
- if ln='1' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE' BBS name:'OFF
- end
- else do
- msg ' BBS name:'
- end
-
- getline 58 normal ' '
- BBS$.n.1 = result
- end
-
- if ln='2' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE' Telephone number:'OFF
- end
- else do
- msg ' Telephone number:'
- end
-
- getline 58 normal ' '
- BBS$.n.2 = result
- end
-
- if ln='3' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE' Open hours:'OFF
- end
- else do
- msg ' Open hours:'
- end
-
- getline 58 normal ' '
- BBS$.n.3 = result
- end
-
- if ln='4' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE' Max baud rate:'OFF
- end
- else do
- msg ' Max baud rate:'
- end
-
- getline 58 normal ' '
- BBS$.n.4 = result
- end
-
- if ln='5' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE' Location:'OFF
- end
- else do
- msg ' Location:'
- end
-
- getline 58 normal ' '
- BBS$.n.5 = result
- end
-
- if ln='6' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE' BBS Software:'OFF
- end
- else do
- msg ' BBS Software:'
- end
-
- getline 58 normal ' '
- BBS$.n.6 = result
- end
-
- if ln='7' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE' Sysop''s name:'OFF
- end
- else do
- msg ' Sysop''s name:'
- end
-
- getline 58 normal ' '
- BBS$.n.7 = result
- end
-
- if ln='8' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE' Mail Networks:'OFF
- end
- else do
- msg ' Mail Networks:'
- end
-
- getline 58 normal ' '
- BBS$.n.8 = result
- end
-
- if ln ='9' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE' Net address:'OFF
- end
- else do
- msg ' Net address:'
- end
-
- getline 58 normal ' '
- BBS$.n.9 = result
- end
-
- if ln='10' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE' Email address:'OFF
- end
- else do
- msg ' Email address:'
- end
-
- getline 58 normal ' '
- BBS$.n.10 = result
- end
-
- if ln='11' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE'Computers supported:'OFF
- end
- else do
- msg 'Computers supported:'
- end
-
- getline 58 normal ' '
- BBS$.n.11 = result
- end
-
- if ln='12' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE' Comment (1/3):'OFF
- end
- else do
- msg ' Comment (1/3):'
- end
-
- getline 58 normal ' '
- BBS$.n.12 = result
- end
-
- if ln='13' then do
- newline
-
- if _ANSI = -1 then do
- msg GRE' Comment (2/3):'OFF
- end
- else do
- msg ' Comment (2/3):'
- end
-
- getline 58 normal ' '
- BBS$.n.13 = result
- end
-
-
- if ln='14' then do
- newline
-
- if _ANSI = 1 then do
- msg GRE' Comment (3/3):'OFF
- end
- else do
- msg ' Comment (3/3):'
- end
-
- getline 58 normal ' '
- BBS$.n.14 = result
- end
- /* END OF EDIT */
-
-
- /* ABORT EDIT AND DONT SAVE */
- if ln='A' then do
-
- newline
- queryn 'Realy abort edit, changes will not be saved '
- confirm=upper(result)
- /* ABORT THE ABORT */
- if confirm ~= 'Y' then do
- abort='N'
- end
- else do
- abort='Y'
- end
-
- end
-
- end
-
- end
-
- end
-
- end
-
- call BANNER
- newline
-
- message 'There are no more BBS records that can be edited by you.'
- message 'If a BBS record is incorrect please mail the Sysop.'
- newline
- msg 'Press any key to continue'
-
- getchar
-
- return
-
- /* ======================================================================== */
-
- HELP:
-
- call TEXT(help.txt)
-
- return
-
- /* ======================================================================== */
-
- TEXT:
- /* LOAD AND DISPLAY A ASCII TEXT FILE ARGS [FILENAME] */
- arg fname$
-
- /* CHECK FILE EXISTS */
- if exists(PATH$||fname$) then do
- l = 0
-
- /* OPEN FILE AND READ ALL LINES INTO DYNAMIC ARRAY */
- call open(ASCII_file, path$||fname$, 'r')
- /* RESET FILE POINTER TO BEGINING OF FILE */
- call SEEK(ASCII_file, 0, 'B')
-
- do until EOF(ASCII_file)
- l = l + 1
- ASCIIline$.l = readln(ASCII_file)
- end
-
- /* call close(fname$) */
- call close(ASCII_file)
-
- z=0
- x=0
- cls
- call Banner
- newline
-
- /* DISPLAY THE TEXT ONE SCREEN FULL AT A TIME */
- do a = 1 to l
- message ASCIIline$.a
- z=z+1
- x=x+1
-
- if z = dplength | x = l then do
- z = 0
- newline
- msg ' [Return] to continue [Q]uit'
- getchar
- erm = result
-
- /* IF 'Q' SELECTED QUIT THE LOOP */
- if upper(erm) = 'Q' then do
- a = l
- end
- /* IF MORE TEXT TO BE DISPLAYED RE-DRAW TITLE */
- else if a ~= l then do
- cls
- call Banner
- newline
- /* message a' 'l
- message ASCII_file
- */
- end
-
- end
-
- end
- end
- else do
- /* IF FILE WASN'T FOUND DISPLAY ERROR MESSAGE AND CONTINUE */
- cls
- message '< ERROR > Can not find 'PATH$||fname$' file to load!'
- newline
- message 'Press any key'
- getchar
- end
-
- return
-
- /* ======================================================================== */
-
- BANNER:
-
- CLS
- if _ANSI = 1 then do
- message YEL' Another Pickled Fish Software Production '
- message OFF' BG ËÍ» ËÍ» ÉÍ» Ë Ë ÉÍ» ÉË» ÉÍ» ËÍ»'
- message CYA' Ì͹ Ì͹ ÈÍ» º º ÈÍ» º ÌÍ Ì˼'
- message BLU' Êͼ Êͼ Èͼ Èͼ Ê Èͼ Ê Èͼ ÊÈÍ V0.6'OFF
- message CYA' Channel X +44 (0)181 943 5187 'YEL'(C)1998 Ben Gaunt'CYA' Channel X +44 (0)181 943 5187 '
- end
- else do
- message '_____________________Another Pickled Fish Software Production__________________'
- message ' BG _ _ _ _ ___ __ _ '
- message ' |_)|_)|_'' | | |_'' | |_ |_|'
- message ' |_)|_)._| |__ | ._| | |__ | \ V0.6'
- message '_______________________________________________________________________________'
- end
-
- return
-
- /* ======================================================================== */
-
- DISPLAYBBS:
- arg zx
- if _ANSI = 1 then do
- newline
- message GRE' BBS name: 'YEL||BBS$.zx.1
- message GRE' Telephone number: 'OFF||BBS$.zx.2
- message GRE' Open hours: 'OFF||BBS$.zx.3
- message GRE' Max baud rate: 'OFF||BBS$.zx.4
- message GRE' Location: 'OFF||BBS$.zx.5
- message GRE' BBS Software: 'OFF||BBS$.zx.6
- message GRE' Sysop''s name: 'OFF||BBS$.zx.7
- message GRE' Mail Networks: 'OFF||BBS$.zx.8
- message GRE' Net address: 'OFF||BBS$.zx.9
- message GRE' Email address: 'OFF||BBS$.zx.10
- message GRE'Computers supported: 'OFF||BBS$.zx.11
- message GRE' Comment: 'CYA||BBS$.zx.12
- message GRE' 'CYA||BBS$.zx.13
- message GRE' 'CYA||BBS$.zx.14
- message GRE'Date placed on list: 'RED||BBS$.zx.15||OFF
- end
- else do
- newline
- message ' BBS name: '||BBS$.zx.1
- message ' Telephone number: '||BBS$.zx.2
- message ' Open hours: '||BBS$.zx.3
- message ' Max baud rate: '||BBS$.zx.4
- message ' Location: '||BBS$.zx.5
- message ' BBS Software: '||BBS$.zx.6
- message ' Sysop''s name: '||BBS$.zx.7
- message ' Mail Networks: '||BBS$.zx.8
- message ' Net address: '||BBS$.zx.9
- message ' Email address: '||BBS$.zx.10
- message 'Computers supported: '||BBS$.zx.11
- message ' Comment: '||BBS$.zx.12
- message ' '||BBS$.zx.13
- message ' '||BBS$.zx.14
- message 'Date placed on list: '||BBS$.zx.15
- end
-
- return
-
- /* ======================================================================== */
-
- DATLOAD:
- /* SEE IF FILE EXISTS */
- if exists(PATH$||'BGBBS.DAT') then do
- i=1
- n=1
- call open(datafile, PATH$||'BGBBS.DAT', 'R')
-
- do until EOF(datafile)
- BBS$.n.i = readln(datafile)
- i=i+1
- if i = 17 then do
- i=1
- n=n+1
- end
- end
-
- call close(datafile)
- totalBBS = n-1
- end
- else do
- msg 'No data file exists? Making a new one at > '
- msg PATH$||'BGBBS.DAT'
-
- /* OPEN DATA FILE AND ENTER DATA */
- call open(datafile, PATH$||'BGBBS.DAT', 'w')
- call writeln(datafile, 'Channel X BBS')
- call writeln(datafile, '0181 943 5187')
- call writeln(datafile, '24hrs')
- call writeln(datafile, '28800bps')
- call writeln(datafile, 'London, UK')
- call writeln(datafile, 'Xenolink')
- call writeln(datafile, 'Ben Gaunt')
- call writeln(datafile, 'Fido, Barnet etc')
- call writeln(datafile, 'N/A')
- call writeln(datafile, 'ben.gaunt@pickled.demon.co.uk')
- call writeln(datafile, 'Amiga')
- call writeln(datafile, 'An Amiga based BBS that was established in March 1995 and')
- call writeln(datafile, 'still running. Trouble connecting at 28800+ then disable')
- call writeln(datafile, 'Vfc. Whq for MiggyByte disk mag and Pickled Fish Software')
- daet$ = date()
- call writeln(datafile, daet$)
- call writeln(datafile, 'Ben Gaunt')
- call close(datafile)
-
- /* RE-READ THE DATA IN ;) */
- i=1
- n=1
- call open(datafile, PATH$||'BGBBS.DAT', 'R')
-
- do until EOF(datafile)
- BBS$.n.i = readln(datafile)
- i=i+1
- if i = 17 then do
- i=1
- n=n+1
- end
- end
-
- call close(datafile)
- totalBBS = n-1
-
- end
-
- return
-
- /* ======================================================================== */
-
- SYNTAX:
- /* IF AN SYNTAX ERROR HAPPENS INFORM SYSOP */
- CLS
- message 'Syntax error in BGBBS...'
- message 'Please inform the Sysop.'
- message 'Error occured in line:' SIGL
- msg 'Press any key'
- getchar
- exit
-